@font-face {
    font-family: 'VT323';
    src: url('/Assets/Font/VT323-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Montserrat';
    src: url('/Assets/Font/Montserrat-VariableFont_wght.ttf') format('truetype');
}

@font-face {
    font-family: 'Yellowtail';
    src: url('/Assets/Font/Yellowtail-Regular.ttf') format('truetype');
}

body {
    font-family: "Montserrat", sans-serif;
    letter-spacing: 1px;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    padding-top: constant(safe-area-inset-top);
    padding-bottom: constant(safe-area-inset-bottom);
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    background: #00ff00;
}

body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/black-orchid.png'), rgba(0, 0, 0, 0.5);
    opacity: 0.7;
    pointer-events: none;
    z-index: -1;
}

#ios-top-fix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: constant(safe-area-inset-top);
    height: env(safe-area-inset-top, 0);
    background: #00ff00;
    z-index: 999999;
    pointer-events: none;
}

body.in-app-browser {
    padding-top: max(env(safe-area-inset-top, 0px), 20px);
}

body.in-app-browser #ios-top-fix {
    height: max(env(safe-area-inset-top, 0px), 20px);
}

.background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -999;
}

img {
    user-drag: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -moz-drag-over: none;
    -moz-window-dragging: no-drag;
    -moz-user-drag: none;
    -moz-user-select: -moz-none;
    draggable: false;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.spin-trigger {
    pointer-events: auto;
    position: relative;
    user-select: none;
}

:root {
    --main-container-bg: url('/Assets/Textures/3px-tile-default.png'), linear-gradient( to right, #001b0b 0%, #00331a 14%, #0c6b3a 30%, #39ff9b 46%, #9dffd2 52%, #2fd884 60%, #0c6b3a 72%, #00331a 86%, #001b0b 100%);
    --container-shadow: 0 0 2px rgba(0, 0, 0, 0.8), inset 0 1px 1.5px rgba(255, 255, 255, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.2), inset 0 -1px 1.5px rgba(0, 0, 0, 0.4), inset 0 -2.5px 4px rgba(0, 0, 0, 0.2), inset 2px 0 4px rgba(0, 0, 0, 0.25), inset -2px 0 4px rgba(0, 0, 0, 0.25), inset 0 0 6px rgba(120, 255, 190, .55), inset 0 0 14px rgba(0, 255, 120, .35), 0 0 10px rgba(0, 255, 120, .45);
    --button-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.2), inset 0 -3px 5px rgba(0, 0, 0, 0.5);
    --controls-bg: url('/Assets/Textures/green-fibers-default.png'), linear-gradient( to right, #003300 0%, #016001 20%, #03b02e 40%, #00f03c 60%, #03b02e 80%, #003300 100%);
    --controls-shadow: inset 0 5px 8px #001f00, inset 0 -5px 8px #04b931, inset 8px 0 10px #003300, inset -5px 0 8px #03b02e;
    --silver-bg: linear-gradient( to right, #0a0a0a 0%, #2b2b2b 8%, #6f6f6f 18%, #bdbdbd 32%, #7a7a7a 58%, #9f9f9f 84%, #1a1a1a 100%);
    --silver-bg-pipe: url('https://www.transparenttextures.com/patterns/carbon-fibre.png'), linear-gradient( to right, #1a1a1a 0%, #2d2d2d 18%, #4e4e4e 42%, #7a7a7a 50%, #4e4e4e 58%, #2d2d2d 82%, #1a1a1a 100%);
    --speaker-bg: url('https://www.transparenttextures.com/patterns/dark-mosaic.png'), linear-gradient( to right, #2a2111 0%, #5c4a25 14%, #8b7740 32%, #c8b26a 46%, #f5e6a3 52%, #a08a4c 60%, #5c4a25 78%, #2a2111 100%);
    --main-text-color: #b6ffd9;
    --main-border: 1px solid #00f03c;
    --content-bg: #001100;
    --main-font-size: 1rem;
    --mobile-font-size: 0.7rem;
    --border-radius: 0.75em;
    --screen-text-color: #00ff00;
    --screen-text-color-main: #00f03c;
    --screen-border-radius: 2rem;
    --screen-border: 1px solid #00f03c;
    --mini-screen-border-radius: 2px;
    --screen-edge-dirt: inset 0 0 30px rgba(0, 255, 102, 0.5), inset 0 0 40px rgba(0, 153, 51, 0.35), inset 0 0 8px rgba(255, 255, 255, 0.2);
    --screen-font-family: 'VT323', monospace;
    --button3d-base-before: linear-gradient(to bottom, #00ff66, #009933);
    --btn-text-color: #b6ffd9;
    --logo-text-color-main: #002200;
    --logo-text-color-secondary: #ae2929;
    --lable-border-color: #002200;
    --lable-bg-color: linear-gradient( to right, #002200 0%, #014111 30%, #014111 50%, #014111 70%, #002200 100%);
}

.pipes-main-spin-screen {
    overflow: hidden;
    display: flex;
    gap: 120px;
    justify-content: center;
    align-items: center;
}

.pipe-main-spin-screen {
    width: 200px;
    height: 15px;
    background: var(--silver-bg-pipe);
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 10px 10px rgba(0, 0, 0, 0.6);
}

.pipes-to-player {
    overflow: hidden;
    display: flex;
    gap: 500px;
    justify-content: center;
    align-items: center;
    z-index: 10;
    margin-top: 2px;
}

.pipe-player {
    width: 50px;
    height: 50px;
    background: var(--silver-bg-pipe);
    border-radius: 0.75em 0.75em 0 0;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 10px 10px rgba(0, 0, 0, 0.6);
}

.pipes-mobile {
    display: none;
    gap: 220px;
    justify-content: center;
    align-items: center;
}

.pipes-wide {
    overflow: hidden;
    display: flex;
    gap: 550px;
    justify-content: center;
    align-items: center;
}

.pipes {
    overflow: hidden;
    display: flex;
    gap: 320px;
    justify-content: center;
    align-items: center;
}

.pipes-footer {
    overflow: hidden;
    display: flex;
    gap: 320px;
    justify-content: center;
    align-items: center;
    z-index: 3;
    margin-bottom: 2px;
}

.pipe-footer {
    width: 50px;
    height: 50px;
    background: var(--silver-bg-pipe);
    border-radius: 0 0 0.75em 0.75em;
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3);
}

.pipe {
    width: 50px;
    height: 50px;
    background: var(--silver-bg-pipe);
    box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.3), 0 10px 10px rgba(0, 0, 0, 0.6);
}

.container-header {
    padding: 0 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.container-header h2 {
    color: var(--main-text-color);
    font-size: 1rem;
    background: linear-gradient( to right, #003300 0%, #02641b 30%, #02691c 50%, #02641b 70%, #003300 100%);
    box-shadow: 0 2px 2px -1px #003300 inset, 0 -2px 2px -1px #003300 inset, 2px 0 2px -1px #003300 inset, -2px 0 1px -0.5px #003300 inset;
    font-family: sans-serif;
    padding: 0px 20px;
    border-radius: 2px;
}

.screen-border {
    box-sizing: border-box;
    position: relative;
    flex-grow: 1;
    padding: 15px;
    border-radius: var(--screen-border-radius);
    background: var(--silver-bg);
    box-shadow: 0 0 0 1px #000000, 0 0 8px rgba(0, 0, 0, 0.8), inset 0 2px 3px rgba(255, 255, 255, 0.6), inset 0 4px 10px rgba(255, 255, 255, 0.2), inset 0 -2px 3px rgba(0, 0, 0, 0.4), inset 0 -5px 8px rgba(0, 0, 0, 0.2), inset 4px 0 8px rgba(0, 0, 0, 0.25), inset -4px 0 8px rgba(0, 0, 0, 0.25);
}

.screen-border::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
    border-radius: calc(var(--screen-border-radius) - 15px);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(200, 200, 200, 0.2) 80%, rgba(150, 150, 150, 0.1) 93%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.25;
    pointer-events: none;
}

.screen-dirt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    box-shadow: inset 0 0 10px #999999, inset 0 0 9rem rgba(0, 0, 0, 0.8), inset 0 0 1.5rem rgba(0, 0, 0, 0.8), 0 0 5rem rgba(0, 0, 0, 0.8);
    border-radius: var(--screen-border-radius);
}

.screen-dirt-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('https://www.transparenttextures.com/patterns/asfalt-light.png');
    opacity: 0.3;
    pointer-events: none;
}

.mini-screen-border {
    box-sizing: border-box;
    position: relative;
    padding: 5px;
    border-radius: var(--mini-screen-border-radius);
    background: var(--silver-bg);
    box-shadow: 0 0 0 1px #000000, 0 0 4px rgba(0, 0, 0, 0.8), inset 0 1px 1.5px rgba(255, 255, 255, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.2), inset 0 -1px 1.5px rgba(0, 0, 0, 0.4), inset 0 -2.5px 4px rgba(0, 0, 0, 0.2), inset 2px 0 4px rgba(0, 0, 0, 0.25), inset -2px 0 4px rgba(0, 0, 0, 0.25);
}

.mini-screen-border::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border-radius: calc(var(--mini-screen-border-radius) - 5px);
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(200, 200, 200, 0.2) 80%, rgba(150, 150, 150, 0.1) 93%, rgba(255, 255, 255, 0) 100%);
    opacity: 0.25;
    pointer-events: none;
}

.button3d-frame {
    display: inline-block;
    padding: 0px 3px 8px 3px;
    border-radius: var(--border-radius);
    background: linear-gradient( to right, #0a0a0a 0%, #2b2b2b 8%, #6f6f6f 18%, #cfcfcf 32%, #ffffff 40%, #bdbdbd 48%, #7a7a7a 58%, #2f2f2f 72%, #9f9f9f 84%, #1a1a1a 100%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.8), inset 0 1px 1.5px rgba(255, 255, 255, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.2), inset 0 -1px 1.5px rgba(0, 0, 0, 0.4), inset 0 -2.5px 4px rgba(0, 0, 0, 0.2), inset 2px 0 4px rgba(0, 0, 0, 0.25), inset -2px 0 4px rgba(0, 0, 0, 0.25);
}

.button3d {
    font-family: "Montserrat", sans-serif;
    transform: translateY(-0.3em);
    touch-action: manipulation;
    font-size: 1rem;
    color: var(--btn-text-color);
    text-transform: uppercase;
    padding: 0.6em 0.8em;
    background: var(--silver-bg);
    box-shadow: var(--button-shadow);
    border-radius: var(--border-radius);
    transform-style: preserve-3d;
    transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), background 150ms cubic-bezier(0, 0, 0.58, 1);
    text-shadow: -0.4px -0.4px 0 #000, 0.4px -0.4px 0 #000, -0.4px 0.4px 0 #000, 0.4px 0.4px 0 #000;
}

.button3d::before {
    position: absolute;
    content: "";
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--button3d-base-before);
    border-radius: inherit;
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5), inset 0 -1px 3px 3px rgba(0, 0, 0, .4);
    transform: translate3d(0, 0.55em, -1em);
    transition: transform 150ms cubic-bezier(0, 0, 0.58, 1), box-shadow 150ms cubic-bezier(0, 0, 0.58, 1);
    pointer-events: none;
}

.button3d:hover {
    transform: translate(0, -0.15em);
}

.button3d:hover::before {
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5), inset 0 -2px 3px 1px rgba(0, 0, 0, .4);
    transform: translate3d(0, 0.4em, -1em);
}

.button3d:active {
    transform: translate(0em, 0.25em);
}

.button3d:active::before {
    box-shadow: 0px 0 3px 0px rgba(0, 0, 0, 0.5), inset 0 -1px 2px 2px rgba(0, 0, 0, .4);
    transform: translate3d(0, 0, -1em);
}

.button3d.active {
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5);
    transform: translate(0em, 0.25em);
}

.button3d.active::before {
    box-shadow: 0 0 0 1px #164409, inset 0 1px 2px rgba(255, 255, 255, 0.15), inset 0 -2px 6px rgba(0, 0, 0, 0.4);
    transform: translate3d(0, 0, -1em);
}

.button3d:disabled {
    pointer-events: none;
    background: #888;
    color: white;
    text-shadow: -0.5px -0.5px 0 #000, 0.5px -0.5px 0 #000, -0.5px 0.5px 0 #000, 0.5px 0.5px 0 #000;
}

.button3d:disabled::before {
    background: #616161;
}

.flat-button-frame {
    display: inline-block;
    padding: 4px;
    border-radius: var(--border-radius);
    background: linear-gradient( to right, #0a0a0a 0%, #2b2b2b 8%, #6f6f6f 18%, #cfcfcf 32%, #ffffff 40%, #bdbdbd 48%, #7a7a7a 58%, #2f2f2f 72%, #9f9f9f 84%, #1a1a1a 100%);
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.8), inset 0 1px 1.5px rgba(255, 255, 255, 0.6), inset 0 2px 5px rgba(255, 255, 255, 0.2), inset 0 -1px 1.5px rgba(0, 0, 0, 0.4), inset 0 -2.5px 4px rgba(0, 0, 0, 0.2), inset 2px 0 4px rgba(0, 0, 0, 0.25), inset -2px 0 4px rgba(0, 0, 0, 0.25);
}

.flat-btn {
    font-family: "Montserrat", sans-serif;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    font-size: var(--main-font-size);
    color: var(--btn-text-color);
    background: var(--silver-bg);
    border-radius: var(--border-radius);
    text-transform: uppercase;
    padding: 0.6em 0.8em;
    box-shadow: 0 0.05em 0.05em -0.01em rgba(5, 5, 5, 1), 0 0.01em 0.01em -0.01em rgba(5, 5, 5, 0.5), 0.15em 0.3em 0.1em -0.01em rgba(5, 5, 5, 0.25), var(--button-shadow);
}

.flat-btn::before {
    box-shadow: 0px 0px 0px 1px rgba(0, 0, 0, 0.5), inset 0 -1px 3px 3px rgba(0, 0, 0, .4);
}

.flat-btn:hover {
    box-shadow: 0 0.05em 0.05em -0.01em rgba(5, 5, 5, 0.5), 0 0.01em 0.01em -0.01em rgba(5, 5, 5, 0.25), 0.15em 0.3em 0.1em -0.01em rgba(5, 5, 5, 0.125), var(--button-shadow);
}

.flat-btn:active {
    box-shadow: 0 0 0 0 rgba(5, 5, 5, 1), 0 0 0 0 rgba(5, 5, 5, 0.5), 0 0 0 0 rgba(5, 5, 5, 0.25), var(--button-shadow);
    transform: scale(0.99);
}

@media (max-width: 768px) {
    .pipe-main-spin-screen {
        width: 130px;
        height: 10px;
    }
    .pipes-to-player {
        gap: 200px;
    }
    .flat-btn {
        font-size: var(--mobile-font-size);
    }
    .screen-border {
        padding: 10px;
    }
    .pipes-wide {
        gap: 220px;
    }
    .pipes {
        gap: 220px;
    }
    .pipes-mobile {
        display: flex;
    }
    .pipes-footer {
        gap: 220px;
    }
    .pipe-footer {
        width: 30px;
        height: 40px
    }
    .pipe-player {
        width: 30px;
        height: 40px
    }
    .pipe {
        width: 30px;
        height: 40px;
    }
    .button3d-frame {
        padding: 0.5px 3px 6px 3px;
    }
    .button3d {
        border: none;
        font-size: 0.7rem;
    }
    .container-header {
        padding: 0 5px;
    }
    .container-header i {
        font-size: 0.8rem;
    }
    .container-header h2 {
        font-size: 0.8rem;
    }
}

/* Gun countdown styles */

#gun-countdown {
    animation: gunCountdownPulse 1s infinite alternate;
}

@keyframes gunCountdownPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes gunCountdown {
    0% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
        color: #ff0000;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.0);
        color: #ff4444;
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2);
        color: #ff0000;
    }
}

@keyframes crackAppear {
    0% {
        opacity: 0;
        transform: rotate(var(--rotation, 0deg)) scale(0.5);
    }
    20% {
        opacity: 0.8;
        transform: rotate(var(--rotation, 0deg)) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: rotate(var(--rotation, 0deg)) scale(1.0);
    }
}

@keyframes crackAppearPermanent {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.0);
    }
}